package com.unbox.rabbit.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * <日志管理实体类
 * </p>
 *
 * @author 王振宇
 * @since 2021-04-01
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("unbox_log")
@ApiModel(value = "Log", description = "日志管理")
public class Log implements Serializable {
    private static final long serialVersionUID = 1L;

   /**
    * 标识id
    */
    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value = "标识id", name = "id")
    private Integer id;

   /**
    * 创建时间
    */
    @TableField(value = "create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间", name = "createTime")
    private LocalDateTime createTime;

   /**
    * 方法
    */
    @TableField(value = "method")
    @ApiModelProperty(value = "方法", name = "method")
    private String method;

   /**
    * 名称标识
    */
    @TableField(value = "name")
    @ApiModelProperty(value = "名称标识", name = "name")
    private String name;

   /**
    * 操作类型
    */
    @TableField(value = "operation_type")
    @ApiModelProperty(value = "操作类型", name = "operationType")
    private String operationType;

   /**
    * 操作人Id
    */
    @TableField(value = "operator_id")
    @ApiModelProperty(value = "操作人Id", name = "operatorId")
    private Integer operatorId;

   /**
    * 操作人账号
    */
    @TableField(value = "operator_name")
    @ApiModelProperty(value = "操作人账号", name = "operatorName")
    private String operatorName;

   /**
    * 请求体
    */
    @TableField(value = "request_body")
    @ApiModelProperty(value = "请求体", name = "requestBody")
    private String requestBody;

   /**
    * 返回体
    */
    @TableField(value = "response_body")
    @ApiModelProperty(value = "返回体", name = "responseBody")
    private String responseBody;

   /**
    * 执行时间
    */
    @TableField(value = "run_time")
    @ApiModelProperty(value = "执行时间", name = "runTime")
    private Integer runTime;

   /**
    * 0 成功 1失败
    */
    @TableField(value = "stats")
    @ApiModelProperty(value = "0 成功 1失败", name = "stats")
    private Integer stats;

   /**
    * 请求地址
    */
    @TableField(value = "url")
    @ApiModelProperty(value = "请求地址", name = "url")
    private String url;

    @TableField(value = "service_name")
    @ApiModelProperty(value = "请求服务", name = "service_name")
    private String serviceName;

    @ApiModelProperty(value = "class名称", name = "class_name")
    @TableField(value = "class_name")
    private String className;
}
